package dialer.ws.business.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dialer.ws.base.entity.Form;
import dialer.ws.base.query.NamedQueryParameter;
import dialer.ws.base.service.impl.GenericServiceImpl;
import dialer.ws.business.dao.FormDAO;
import dialer.ws.business.service.FormService;

@Service("formService")
public class FormServiceImpl extends GenericServiceImpl<Form, Integer> implements FormService, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3682772078951059745L;

	private FormDAO formDAO;

	@Autowired
	public FormServiceImpl(FormDAO formDAO) {
		super(formDAO);
		this.formDAO = formDAO;
	}

	@Override
	public List<Form> getFormByState(String string) {
		NamedQueryParameter param = new NamedQueryParameter("estatus", "A");
		return findByNamedQueryNamedParameter("getFormByState", param);
	}

}
